package contraintes;

import java.util.HashMap;

import apps.TypeCours;

public class Seance {
	private int id;
	private int idPrecedent;
	private int duree;
	private int capacite;
	private TypeCours type;
	private boolean effectuee;
	private HashMap<String, ContrainteSalle> listeContrainteSalle;
	private String Enseignant;
	
	public Seance(int id, int idPrecedent, int duree, int capacite, TypeCours type, boolean effectuee) {
		this.id = id;
		this.idPrecedent = idPrecedent;
		this.duree = duree;
		this.capacite = capacite;
		this.type = type;
		this.effectuee = effectuee;
		this.listeContrainteSalle = new HashMap<String, ContrainteSalle>();
		this.setEnseignant("unknown");
	}
	
	public int getId() {
		return id;
	}
	public int getIdPrecedent() {
		return idPrecedent;
	}
	public int getDuree() {
		return duree;
	}
	public int getCapacite() {
		return capacite;
	}
	public TypeCours getType() {
		return type;
	}
	public boolean isEffectuee() {
		return effectuee;
	}

	public void addContrainteSalleInListe(ContrainteSalle cs) {
		this.listeContrainteSalle.put(cs.getNomContrainte(), cs);
	}

	public ContrainteSalle getContrainteSalleInListe(String nomContrainte) {
		return this.listeContrainteSalle.get(nomContrainte);
	}
	
	public void removeContrainteSalleInListe(String nomContrainte ) {
		this.listeContrainteSalle.remove(nomContrainte);
	}

	public void setEnseignant(String enseignant) {
		Enseignant = enseignant;
	}

	public String getEnseignant() {
		return Enseignant;
	}
}
